<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>会员信息</title>
		<link rel="stylesheet" href="../css/body.css" />
		<link rel="stylesheet" href="../css/bootstrap.css" />
		<script type="text/javascript" src="../js/jquery-3.2.1.js"></script>
		<script type="text/javascript" src="../js/bootstrap.js"></script>
		<script type="text/javascript" src="../js/getPath.js" ></script>
		<style>
			.container{
				margin-left: 200px;
				margin-top: 30px;
			}
			tr,
			th{
				text-align: center;
			}
		</style>
	</head>
	<body>
		<div class="container">
			<div class="row clearfix">
				<div class="col-md-10 column">
					<table class="table table-hover table-bordered">
						<thead>
							<tr class="active">
								<th>会员名字</th>
								<th>累计金额</th>
								<th>折扣</th>
							</tr>
						</thead>
						<tbody id="tbody">
							
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</body>
	<script>
		$(function(){
			$.ajax({
				type:"post",
				data:({
					'method':'query',
					
				}),
				url: getPath() + "/vip",
				dataType:'json',
				success:function(jsonData){
					$(jsonData.data).each(function(index,data){
						var tr = $('<tr class="info"></tr>');
						var vipName = $('<td>' + data.vipName + '</td>');
						var vipMoney = $('<td>' + data.vipMoney + '</td>');
						var vipDiscount = $('<td>' + data.vipDiscount + '</td>');
						
						tr.append(vipName);
						tr.append(vipMoney);
						tr.append(vipDiscount);
						
						$('#tbody').append(tr);
					});
				}
			});
		});
	</script>
</html>
